repl_map = {}  ## category -> color
repl_map_revert = {}   #color -> category
html_tag = '<font color="%s">%s</font>'
repl_map['PER'] = 'FF0000' #''<font color="FF0000">%s</font>'
repl_map['COM'] = '00CC00' #'<font color="aFcf00">%s</font>'
repl_map['LOC'] = 'AF009F' #'<font color="aF009f">%s</font>'
repl_map['ORG'] = '0F3FAF' #'<font color="0F3FAF">%s</font>'
repl_map['JOB'] = 'AF8F00' #'<font color="AF8F00">%s</font>'
repl_map_revert = dict([(y,x) for x,y in repl_map.items()])


_line_check = ["-" + x[0] for x in repl_map.keys()]

def char_is_label(line):
    return any([line.find(l) > 0 for l in _line_check])


